package com.lottery.material.entity.banner;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.lottery.material.entity.base.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;

/**
 * Description：banner配置表
 * Created by 朱正磊 on 2019-04-09 10:18
 */
@Entity
@Data
@EqualsAndHashCode(callSuper = false)
@Table(name = "material_banner_conf")
public class BannerConf extends BaseEntity {

    private static final long serialVersionUID = -5071083957018970958L;

    @Column(columnDefinition = "varchar(100) comment 'banner名称'")
    private String bannerName;

    @Column(columnDefinition = "int(2) comment '排序'")
    private Integer sort;

    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @Column(columnDefinition = "datetime comment '开始时间'")
    private Date startTime;

    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @Column(columnDefinition = "datetime comment '结束时间'")
    private Date endTime;

    @Column(columnDefinition = "varchar(255) comment '图片地址'")
    private String pictureAddress;

    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @Column(columnDefinition = "datetime comment '修改时间'")
    private Date updateTime;

    @Column(columnDefinition = "varchar(10) comment '所属模块编号'")
    private String moduleCode;

    @Column(columnDefinition = "varchar(10) comment '跳转类型编号（material_banner_jump_type_dict表jump_type_code）'")
    private String jumpTypeCode;

    @Column(columnDefinition = "varchar(100) comment '跳转内容（可以是地址或文章id或圈子id或达人id等）'")
    private String jumpInfo;

    @Column(columnDefinition = "int(1) default '2' comment '状态 1：上架；2：下架'")
    private Integer state;

    @Column(columnDefinition = "varchar(500) comment '备注'")
    private String remark;

}
